<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dubbo安全机制深度解析 | 技术小馆</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            line-height: 1.8;
            color: #333;
            background-color: #f9fafc;
        }
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
            color: #1a202c;
        }
        .drop-cap:first-letter {
            float: left;
            font-size: 3.5rem;
            line-height: 3rem;
            padding-top: 0.5rem;
            padding-right: 0.5rem;
            font-weight: bold;
            color: #4a5568;
        }
        .gradient-text {
            background: linear-gradient(90deg, #3b82f6, #8b5cf6);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .code-block {
            font-family: 'Courier New', Courier, monospace;
            background-color: #2d3748;
            color: #f8fafc;
            border-radius: 0.5rem;
            position: relative;
        }
        .code-block::before {
            content: '';
            display: block;
            height: 1.5rem;
            background-color: #1a202c;
            border-top-left-radius: 0.5rem;
            border-top-right-radius: 0.5rem;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <div class="relative overflow-hidden bg-gradient-to-r from-blue-900 to-indigo-800 text-white">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-24 md:py-32">
            <div class="relative z-10">
                <h1 class="text-4xl md:text-5xl lg:text-6xl font-bold mb-6 leading-tight">
                    Dubbo<span class="gradient-text">安全机制</span>深度解析
                </h1>
                <p class="text-xl md:text-2xl text-blue-100 max-w-3xl mb-8">
                    全面保障分布式服务的认证、加密与审计，构建坚不可摧的微服务安全防线
                </p>
                <div class="flex items-center space-x-2 text-blue-200">
                    <i class="fas fa-shield-alt"></i>
                    <span>确保服务安全性与数据保密性</span>
                </div>
            </div>
            <div class="absolute right-0 top-0 h-full w-1/3 bg-gradient-to-l from-blue-500/20 to-indigo-800/0"></div>
        </div>
    </div>

    <!-- Main Content -->
    <div class="max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-12 md:py-16">
        <!-- Introduction -->
        <div class="mb-16">
            <p class="drop-cap text-lg md:text-xl text-gray-700">
                Dubbo 的安全机制是为了确保服务的安全性和数据的保密性、完整性以及防止未经授权的访问。Dubbo 提供了多种安全机制来应对不同的安全需求。Dubbo 的安全机制涵盖了认证与授权、数据加密、安全审计与日志、服务隔离与网络安全以及配置安全等方面。通过这些机制，Dubbo 能够确保服务的安全性，保护数据的机密性和完整性，并提供监控和响应安全事件的能力。
            </p>
        </div>

        <!-- Mermaid Diagram -->
        <div class="mb-16 bg-white rounded-xl shadow-lg overflow-hidden">
            <div class="p-6 bg-gray-50 border-b border-gray-200">
                <h3 class="text-xl font-semibold text-gray-800 flex items-center">
                    <i class="fas fa-project-diagram text-indigo-600 mr-2"></i>
                    Dubbo安全机制架构图
                </h3>
            </div>
            <div class="p-6">
                <div class="mermaid">
                    graph TD
                    A[Dubbo安全机制] --> B[认证与授权]
                    A --> C[数据加密]
                    A --> D[安全审计与日志]
                    A --> E[服务隔离与网络安全]
                    A --> F[配置安全]
                    
                    B --> B1[身份认证]
                    B --> B2[授权控制]
                    B1 --> B11[Token认证]
                    B1 --> B12[用户名密码认证]
                    B2 --> B21[RBAC]
                    B2 --> B22[权限控制]
                    
                    C --> C1[传输层加密 TLS/SSL]
                    C --> C2[数据加密]
                    
                    D --> D1[请求响应日志]
                    D --> D2[安全事件日志]
                    
                    E --> E1[网络隔离]
                    E --> E2[服务隔离]
                    
                    F --> F1[配置加密]
                    F --> F2[配置管理]
                </div>
            </div>
        </div>

        <!-- 1. 认证与授权 -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="flex items-center justify-center w-12 h-12 rounded-full bg-indigo-100 text-indigo-600 mr-4">
                    <i class="fas fa-user-shield text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">1. 认证与授权</h2>
            </div>

            <div class="grid md:grid-cols-2 gap-8">
                <!-- 1.1 身份认证 -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <span class="flex items-center justify-center w-8 h-8 rounded-full bg-blue-100 text-blue-600 mr-3">
                                <i class="fas fa-fingerprint"></i>
                            </span>
                            <h3 class="text-xl font-semibold text-gray-800">1.1 身份认证</h3>
                        </div>
                        <p class="text-gray-600 mb-4">
                            身份认证是确保访问服务的客户端是合法用户的关键步骤。Dubbo 支持多种认证机制：
                        </p>
                        <ul class="space-y-2 text-gray-600 mb-6">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span><strong>基于 Token 的认证</strong>: 客户端在调用服务时需要提供有效的 Token，服务器端验证 Token 的合法性。例如，使用 JWT（JSON Web Tokens）来传递用户的身份信息。</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span><strong>基于用户名和密码的认证</strong>: 服务提供者和消费者通过用户名和密码进行身份验证。Dubbo 可以与 LDAP 或其他认证系统集成来实现这一点。</span>
                            </li>
                        </ul>
                        <div class="bg-gray-50 p-4 rounded-lg">
                            <h4 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-2">实现方式</h4>
                            <ul class="space-y-1 text-gray-600">
                                <li class="flex items-start">
                                    <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                    <span>在 Dubbo 的 <code class="bg-gray-100 px-1 py-0.5 rounded">Filter</code> 组件中实现身份验证逻辑</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                    <span>在服务的 <code class="bg-gray-100 px-1 py-0.5 rounded">Invoker</code> 或 <code class="bg-gray-100 px-1 py-0.5 rounded">InvokerInterceptor</code> 中添加认证检查</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="bg-gray-800 px-6 py-4">
                        <h4 class="text-sm font-semibold text-gray-300 uppercase tracking-wider mb-2">代码示例</h4>
                        <div class="code-block">
                            <pre class="overflow-x-auto p-4 text-sm"><code>public class AuthenticationFilter implements Filter {
    @Override
    public Result invoke(Invoker&lt;?&gt; invoker, Invocation invocation) throws RpcException {
        String token = RpcContext.getContext().getAttachment("token");
        if (isValidToken(token)) {
            return invoker.invoke(invocation);
        } else {
            throw new RpcException("Invalid token");
        }
    }
}</code></pre>
                        </div>
                    </div>
                </div>

                <!-- 1.2 授权控制 -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <span class="flex items-center justify-center w-8 h-8 rounded-full bg-purple-100 text-purple-600 mr-3">
                                <i class="fas fa-user-lock"></i>
                            </span>
                            <h3 class="text-xl font-semibold text-gray-800">1.2 授权控制</h3>
                        </div>
                        <p class="text-gray-600 mb-4">
                            授权控制确保经过认证的用户具有访问特定资源的权限。Dubbo 支持基于角色或权限的授权控制：
                        </p>
                        <ul class="space-y-2 text-gray-600 mb-6">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span><strong>基于角色的访问控制（RBAC）</strong>: 根据用户的角色来限制其访问权限。例如，只允许管理员角色访问某些管理接口。</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span><strong>基于权限的访问控制</strong>: 根据用户的具体权限来控制访问。</span>
                            </li>
                        </ul>
                        <div class="bg-gray-50 p-4 rounded-lg">
                            <h4 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-2">实现方式</h4>
                            <ul class="space-y-1 text-gray-600">
                                <li class="flex items-start">
                                    <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                    <span>在 <code class="bg-gray-100 px-1 py-0.5 rounded">Filter</code> 或 <code class="bg-gray-100 px-1 py-0.5 rounded">Interceptor</code> 中实现权限检查</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                    <span>使用权限管理系统集成到 Dubbo 的服务调用中</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="bg-gray-800 px-6 py-4">
                        <h4 class="text-sm font-semibold text-gray-300 uppercase tracking-wider mb-2">代码示例</h4>
                        <div class="code-block">
                            <pre class="overflow-x-auto p-4 text-sm"><code>public class AuthorizationFilter implements Filter {
    @Override
    public Result invoke(Invoker&lt;?&gt; invoker, Invocation invocation) throws RpcException {
        String role = RpcContext.getContext().getAttachment("role");
        if (hasPermission(role, invocation.getMethodName())) {
            return invoker.invoke(invocation);
        } else {
            throw new RpcException("Access denied");
        }
    }
}</code></pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- 2. 数据加密 -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-100 text-blue-600 mr-4">
                    <i class="fas fa-lock text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">2. 数据加密</h2>
            </div>

            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
                <div class="p-6">
                    <p class="text-gray-600 mb-6">
                        数据加密确保服务之间传输的数据在网络中是保密的，防止被窃听或篡改。Dubbo 支持多种数据加密机制：
                    </p>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-exchange-alt text-blue-500 mr-2"></i>
                                传输层加密（TLS/SSL）
                            </h4>
                            <p class="text-gray-600">
                                通过在传输层使用 SSL/TLS 来加密服务之间的通信，确保数据在传输过程中的安全。
                            </p>
                        </div>
                        <div>
                            <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-database text-purple-500 mr-2"></i>
                                数据加密
                            </h4>
                            <p class="text-gray-600">
                                对敏感数据进行加密，如数据库存储和消息传递中的数据加密，防止数据泄露。
                            </p>
                        </div>
                    </div>
                </div>
                <div class="bg-gray-50 px-6 py-4 border-t border-gray-200">
                    <h4 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-2">实现方式</h4>
                    <div class="grid md:grid-cols-2 gap-4">
                        <div>
                            <p class="text-gray-600 flex items-start mb-2">
                                <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                <span>配置 Dubbo 的 <code class="bg-gray-100 px-1 py-0.5 rounded">Protocol</code> 使用 SSL/TLS 协议</span>
                            </p>
                        </div>
                        <div>
                            <p class="text-gray-600 flex items-start mb-2">
                                <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                <span>在应用层使用加密库对数据进行加密和解密</span>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="bg-gray-800 px-6 py-4">
                    <h4 class="text-sm font-semibold text-gray-300 uppercase tracking-wider mb-2">配置示例</h4>
                    <div class="code-block">
                        <pre class="overflow-x-auto p-4 text-sm"><code>&lt;dubbo:protocol name="dubbo" port="20880" threadpool="fixed" threads="200" serialization="json" /&gt;
&lt;dubbo:protocol name="dubbo" port="20880" server="netty" /&gt;</code></pre>
                    </div>
                </div>
            </div>
        </section>

        <!-- 3. 安全审计与日志 -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="flex items-center justify-center w-12 h-12 rounded-full bg-green-100 text-green-600 mr-4">
                    <i class="fas fa-clipboard-list text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">3. 安全审计与日志</h2>
            </div>

            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
                <div class="p-6">
                    <p class="text-gray-600 mb-6">
                        安全审计与日志记录是检测和响应安全事件的重要手段。Dubbo 支持记录服务调用日志和安全审计信息：
                    </p>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-file-alt text-green-500 mr-2"></i>
                                请求和响应日志
                            </h4>
                            <p class="text-gray-600">
                                记录每次服务调用的请求和响应信息，包括调用参数和结果，便于问题排查和审计。
                            </p>
                        </div>
                        <div>
                            <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-exclamation-triangle text-yellow-500 mr-2"></i>
                                安全事件日志
                            </h4>
                            <p class="text-gray-600">
                                记录身份验证失败、授权失败等安全事件，便于及时发现和应对潜在的安全威胁。
                            </p>
                        </div>
                    </div>
                </div>
                <div class="bg-gray-50 px-6 py-4 border-t border-gray-200">
                    <h4 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-2">实现方式</h4>
                    <div class="grid md:grid-cols-2 gap-4">
                        <div>
                            <p class="text-gray-600 flex items-start mb-2">
                                <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                <span>在 Dubbo 的 <code class="bg-gray-100 px-1 py-0.5 rounded">Filter</code> 中添加日志记录逻辑</span>
                            </p>
                        </div>
                        <div>
                            <p class="text-gray-600 flex items-start mb-2">
                                <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                <span>集成日志管理工具，如 ELK Stack（Elasticsearch, Logstash, Kibana）来处理和分析日志</span>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="bg-gray-800 px-6 py-4">
                    <h4 class="text-sm font-semibold text-gray-300 uppercase tracking-wider mb-2">代码示例</h4>
                    <div class="code-block">
                        <pre class="overflow-x-auto p-4 text-sm"><code>public class LoggingFilter implements Filter {
    @Override
    public Result invoke(Invoker&lt;?&gt; invoker, Invocation invocation) throws RpcException {
        long startTime = System.currentTimeMillis();
        Result result = invoker.invoke(invocation);
        long elapsed = System.currentTimeMillis() - startTime;
        System.out.println("Request: " + invocation.getMethodName() + ", Response Time: " + elapsed + "ms");
        return result;
    }
}</code></pre>
                    </div>
                </div>
            </div>
        </section>

        <!-- 4. 服务隔离与网络安全 -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="flex items-center justify-center w-12 h-12 rounded-full bg-yellow-100 text-yellow-600 mr-4">
                    <i class="fas fa-network-wired text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">4. 服务隔离与网络安全</h2>
            </div>

            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
                <div class="p-6">
                    <p class="text-gray-600 mb-6">
                        服务隔离与网络安全确保服务间的隔离，防止安全漏洞的扩散：
                    </p>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-ethernet text-yellow-500 mr-2"></i>
                                网络隔离
                            </h4>
                            <p class="text-gray-600">
                                通过网络策略和防火墙隔离不同的服务层，限制不必要的网络访问。
                            </p>
                        </div>
                        <div>
                            <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-server text-red-500 mr-2"></i>
                                服务隔离
                            </h4>
                            <p class="text-gray-600">
                                将关键服务和敏感数据放在独立的服务实例中，降低安全风险。
                            </p>
                        </div>
                    </div>
                </div>
                <div class="bg-gray-50 px-6 py-4 border-t border-gray-200">
                    <h4 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-2">实现方式</h4>
                    <div class="grid md:grid-cols-2 gap-4">
                        <div>
                            <p class="text-gray-600 flex items-start mb-2">
                                <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                <span>配置服务的网络策略，限制不同服务之间的通信</span>
                            </p>
                        </div>
                        <div>
                            <p class="text-gray-600 flex items-start mb-2">
                                <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                <span>在容器或虚拟机中运行服务，确保服务之间的隔离</span>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="bg-gray-800 px-6 py-4">
                    <h4 class="text-sm font-semibold text-gray-300 uppercase tracking-wider mb-2">配置示例</h4>
                    <div class="code-block">
                        <pre class="overflow-x-auto p-4 text-sm"><code>&lt;dubbo:provider protocol="dubbo" host="10.0.0.1" port="20880" /&gt;
&lt;dubbo:consumer protocol="dubbo" host="10.0.0.2" port="20880" /&gt;</code></pre>
                    </div>
                </div>
            </div>
        </section>

        <!-- 5. 配置安全 -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="flex items-center justify-center w-12 h-12 rounded-full bg-red-100 text-red-600 mr-4">
                    <i class="fas fa-cog text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">5. 配置安全</h2>
            </div>

            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
                <div class="p-6">
                    <p class="text-gray-600 mb-6">
                        配置安全是保护服务配置文件和运行环境的安全：
                    </p>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-key text-red-500 mr-2"></i>
                                配置加密
                            </h4>
                            <p class="text-gray-600">
                                对配置文件中的敏感数据进行加密，防止配置信息泄露。
                            </p>
                        </div>
                        <div>
                            <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-tasks text-indigo-500 mr-2"></i>
                                配置管理
                            </h4>
                            <p class="text-gray-600">
                                使用配置管理工具来确保配置文件的安全性和一致性。
                            </p>
                        </div>
                    </div>
                </div>
                <div class="bg-gray-50 px-6 py-4 border-t border-gray-200">
                    <h4 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-2">实现方式</h4>
                    <div class="grid md:grid-cols-2 gap-4">
                        <div>
                            <p class="text-gray-600 flex items-start mb-2">
                                <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                <span>使用配置管理工具，如 Spring Cloud Config、Apollo 等</span>
                            </p>
                        </div>
                        <div>
                            <p class="text-gray-600 flex items-start mb-2">
                                <i class="fas fa-code text-indigo-500 mt-1 mr-2"></i>
                                <span>在配置文件中加密敏感信息</span>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="bg-gray-800 px-6 py-4">
                    <h4 class="text-sm font-semibold text-gray-300 uppercase tracking-wider mb-2">配置示例</h4>
                    <div class="code-block">
                        <pre class="overflow-x-auto p-4 text-sm"><code>spring:
  cloud:
    config:
      server:
        encrypt:
          enabled: true</code></pre>
                    </div>
                </div>
            </div>
        </section>

        <!-- Summary -->
        <div class="bg-gradient-to-r from-indigo-50 to-blue-50 rounded-xl p-8 mb-16">
            <div class="flex items-center mb-6">
                <div class="flex items-center justify-center w-12 h-12 rounded-full bg-indigo-100 text-indigo-600 mr-4">
                    <i class="fas fa-star text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">总结</h2>
            </div>
            <div class="grid md:grid-cols-2 gap-6">
                <div>
                    <h3 class="text-xl font-semibold text-gray-800 mb-4">核心优势</h3>
                    <ul class="space-y-3 text-gray-600">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                            <span>全面的安全机制覆盖认证、授权、加密、审计等关键领域</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                            <span>灵活的扩展接口可与企业现有安全体系无缝集成</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                            <span>多层次的安全防护确保微服务架构的整体安全性</span>
                        </li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-xl font-semibold text-gray-800 mb-4">最佳实践</h3>
                    <ul class="space-y-3 text-gray-600">
                        <li class="flex items-start">
                            <i class="fas fa-lightbulb text-yellow-500 mt-1 mr-3"></i>
                            <span>为不同安全等级的服务配置不同的安全策略</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-lightbulb text-yellow-500 mt-1 mr-3"></i>
                            <span>定期审计安全日志，及时发现和处理安全事件</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-lightbulb text-yellow-500 mt-1 mr-3"></i>
                            <span>结合容器化技术增强服务隔离和安全性</span>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-8">
        <div class="max-w-5xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <h3 class="text-xl font-bold text-white mb-2">技术小馆</h3>
                    <p class="text-gray-400">探索技术奥秘，分享知识精华</p>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="text-blue-400 hover:text-blue-300 transition-colors duration-300 flex items-center">
                        <i class="fas fa-external-link-alt mr-2"></i>
                        http://www.yuque.com/jtostring
                    </a>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400 text-sm">
                <p>© 2023 技术小馆 版权所有</p>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'dark',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>